package FirstAssignment;

import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;
import java.util.ArrayList;

public class TurnRed extends JFrame {

    private Color ContentPane;

    private JPanel jPanel;

    public TurnRed(){

    this.setSize(600,500);

    this.setLayout(null);

    jPanel=new JPanel();

    jPanel.setBounds(60,60,60,60);

    jPanel.setBackground(Color.RED);

    jPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));

    RedPanel redPanel=new RedPanel(this);

    ContentPane=redPanel.getCurrentColor();

    jPanel.addMouseListener(redPanel);

    this.add(jPanel);

    this.getContentPane().setBackground(ContentPane);

    this.setDefaultCloseOperation(3);

    this.setLocationRelativeTo(null);

    this.setVisible(true);
    }

    public static void main(String[] args) {

        TurnRed turnRed=new TurnRed();
    }

}
